import 'dart:convert';

import 'package:du_application/http/HttpUtil.dart';
import 'package:du_application/http/Options.dart';
import 'package:du_application/model/EvalutateModel.dart';
import 'package:du_application/provide/AuthProvider.dart';
import 'package:flutter/material.dart';
import 'package:provide/provide.dart';
import 'package:shared_preferences/shared_preferences.dart';

class EvaluateProvider with ChangeNotifier{
 EvaluateModel evaluateModel;
   Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
    getEvaluate(context,int id) async {
    await _prefs.then((ins) async{
    Options options =  Options(Provide.value<AuthProvider>(context).token);
   await HttpUtil.getInstance().get("/comment/list",data: {
     "valueId":id
   },options:options.options).then((data) {
     evaluateModel=EvaluateModel.fromJson(json.decode(data));
      notifyListeners();
     });
});
  }


}